<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <h1 id="hh">22221</h1>
  <input type="button" value="返回" id="btn">
<script>
  var btn = document.getElementById("btn");
  btn.onclick = function () {
    // 前进
    history.back();
    history.go(-1);//返回
  }
</script>
</body>
</html>